package com.jbit.springboot_redis.controller;


import com.jbit.springboot_redis.entity.Shop;
import com.jbit.springboot_redis.redis.RedisUtil;
import com.jbit.springboot_redis.service.impl.ShopServiceImpl;
import com.jbit.springboot_redis.service.impl.UserServiceImpl;
import com.jbit.springboot_redis.vo.Result;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author jobob
 * @since 2021-06-09
 */
@RestController
@RequestMapping("/shop")
@Slf4j
public class ShopController {
  private Logger logger= LoggerFactory.getLogger(UserController.class);
  @Autowired
  private ShopServiceImpl shopService;
  @Autowired
  private RedisUtil redisUtil;
//  @CrossOrigin
  @GetMapping("/find")
  private List<Shop> find(){
    System.out.println("方法进来了");
    List<Shop> shops=shopService.list();
    return shops;
  }

}
